package com.itstherules.jmsunit.expectation;

import java.io.FileNotFoundException;

import com.itstherules.jmsunit.loaders.SchemaLoader;
import com.itstherules.jmsunit.loaders.SoapLoader;
import com.itstherules.jmsunit.loaders.XmlLoader;


public final class XmlLoaders  {
	
	public static String schema(String fileName) {
		try {
			return new SchemaLoader().load(fileName);
		} catch (FileNotFoundException e) {
			throw new IllegalArgumentException("There is no schema file for " + fileName);
		}
	}
	
	public static String xml(String fileName) {
		try {
			return new XmlLoader().load(fileName);
		} catch (FileNotFoundException e) {
			throw new IllegalArgumentException("There is no xml file for " + fileName);
		}
	}

	public static String soap(String fileName) {
		try {
			return new SoapLoader().load(fileName);
		} catch (FileNotFoundException e) {
			throw new IllegalArgumentException("There is no xml file for " + fileName);
		}
	}

}
